define(['zepto', 'underscore', configs.htmlPrefix + '/tpl/layout/header.html', configs.htmlPrefix + '/tpl/layout/footer.html'], function ($, _, htpl, ftpl) {
    return {
        load: function (ary) {
            if ($.isArray(ary)) {
                $.each(ary, function (i, obj) {
                    //el默认规则补齐
                    var selector = "#" + obj.el + "-container";
                    //默认模板
                    if ("header" == obj.el) {
                        obj.tpl = htpl;
                    } else if ("footer" == obj.el) {
                        obj.tpl = ftpl;
                    }
                    //覆盖规则
                    $el = $(selector);
                    var flag = false;
                    if (obj.isForce == undefined || obj.isForce == true) {
                        flag = true;
                    } else {
                        var status = $el.attr("status");
                        if ("complete" != status) {
                            flag = true;
                        }
                    }
                    //填充内容
                    if (flag) {
                        $el.html(_.template(obj.tpl)(obj.data || {}));
                        $el.attr("status", "complete");
                    }
                })
            }
        },
        load_header: function (data, isForce) {

        },
        load_footer: function (data, isForce) {

        }
    }
})